define(function(require, exports, module) {
	'use strict';
    
    var rk = require('rk');

    $.widget('rk.oaDialogCtrl', {
            _create: function(){
                var me = this;
                var elem = me.element;     
      
            },
            _init: function(){
                var me = this;
                var elem = me.element;

            },
            closeMe: function(){
            	rk.closeDialog();
            },
            getOpener: function(){
            	
            },
            getFooter: function(type){
            	var me = this;
                var elem = me.element;

                var dialog = elem.parents('.pg-dialog:first');
                return dialog.find('>.pg-dialog-footer');
            },
            getBtn: function(type){
            	var me = this;
            	var footer = me.getFooter();
                return footer.find('*[act="'+type+'"]');
            }
    });
    return $;
});